package com.suke.czx.modules.incentive.service;

import com.suke.czx.common.utils.R;
import com.suke.czx.modules.incentive.entity.IncentiveAllocation;
import com.suke.czx.modules.incentive.entity.IncentiveGenerateBo;

/**
 * 应用模块名称: 绩效
 * 代码描述: 绩效业务层接口
 * copyright: AUZAR ALL RIGHTS RESERVED
 * company: AUZAR
 *
 * @author: 颜米晨
 * @date: 2022/07/27 19:47
 */
public interface IncentiveService {

    /**
     * 校验绩效参数是否完整
     * @param year 年份
     * @param version 版本
     * @return VO
     */
    R configVerify(String year, Integer version);

    /**
     * 查询已关联绩效参数年份版本
     * @param projectId 项目id
     * @return VO
     */
    R related(Long projectId);

    /**
     * 查询绩效考核参数
     * @param incentiveGenerateBo 绩效考核参数查询BO
     * @return VO
     */
    R search(IncentiveGenerateBo incentiveGenerateBo);

    /**
     * 绩效考核
     * @param incentiveGenerateBo 绩效考核参数BO
     * @param userId 用户id
     * @return VO
     */
    R evaluate(IncentiveGenerateBo incentiveGenerateBo, Long userId);

    /**
     * 绩效分配
     * @param incentiveAllocation 绩效分配实体
     * @param userId 用户id
     * @return VO
     */
    R allocate(IncentiveAllocation incentiveAllocation, Long userId);

    /**
     * 删除绩效分配
     * @param incentiveId 绩效分配id
     * @param userId 用户id
     * @return VO
     */
    R delAllocate(Long incentiveId, Long userId);

    /**
     * 生成绩效
     * @param incentiveGenerateBo 绩效生成入参
     * @param userId 用户id
     * @return VO
     */
    R generate(IncentiveGenerateBo incentiveGenerateBo, Long userId);

    /**
     * 初始化绩效
     * @param incentiveGenerateBo 绩效生成入参
     * @return VO
     */
    R initial(IncentiveGenerateBo incentiveGenerateBo);

}